package graduation.claf.vo;

public class StatisticInfo {
    private String name;

    //0-今天 1-本周 2-本月 3-今年
    private int type;

    private String remark;

    private double income;

    private double outcome;

    public StatisticInfo() {
    }

    public StatisticInfo(String title, int type, String remark, double income, double outcome) {
        this.name = title;
        this.type = type;
        this.remark = remark;
        this.income = income;
        this.outcome = outcome;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public double getIncome() {
        return income;
    }

    public void setIncome(double income) {
        this.income = income;
    }

    public double getOutcome() {
        return outcome;
    }

    public void setOutcome(double outcome) {
        this.outcome = outcome;
    }

    public static StatisticInfo createStatistic(int type){
        StatisticInfo statistic = new StatisticInfo();
        statistic.setType(type);
        switch (type){
            case 0: statistic.setName("今天");break;
            case 1: statistic.setName("本周");break;
            case 2: statistic.setName("本月");break;
            case 3: statistic.setName("今年");break;
        }
        return statistic;
    }
}

